package com.iran.chainOfResponsibility;

public class ClientMain {
    public static void main(String[] args) {
        Handler c1 = new ConcreteHandler1();
        Handler c2 = new ConcreteHandler2();
        Handler c3 = new ConcreteHandler3();
        c1.setSuccessor(c2);
        c2.setSuccessor(c3);

        int[] requests = {1,22,21,13,6,2,5};

        for (int i = 0; i < requests.length; i++) {
            c1.handleRequest(requests[i]);
        }
    }
}
